package com.glsc.ngateway.common.base.domain.mysql.gateway.platform.flow;

import com.glsc.ngateway.common.base.domain.mysql.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLDeleteAll;
import org.hibernate.annotations.Where;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author xuchang
 */
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@Entity
@Where(clause = "deleted = 0")
@SQLDelete(sql = "update t_gw_flow_form_equipment_modify_cloud_device_detail set deleted = UNIX_TIMESTAMP(NOW()) where id=?")
@SQLDeleteAll(sql = "update t_gw_flow_form_equipment_modify_cloud_device_detail set deleted = UNIX_TIMESTAMP(NOW()) where id=?")
@Table(name = "t_gw_flow_form_equipment_modify_cloud_device_detail")
@org.hibernate.annotations.Table(appliesTo = "t_gw_flow_form_equipment_modify_cloud_device_detail", comment = "设备变更流程form表单-云平台子表")
public class FlowFormEquipmentModifyCloudDeviceDetail extends BaseEntity {

    private static final long serialVersionUID = -2798872163059148386L;

    @Column(name = "equipment_modify_id", columnDefinition = "bigint not null comment '主表ID'")
    private Long equipmentModifyId;

    @Column(name = "dev_id", columnDefinition = "varchar(64) comment '云平台设备id'")
    private String devId;

    @Column(name = "cloud_id", columnDefinition = "int comment '云平台id'")
    private String cloudId;

    @Column(name = "cloud_style", columnDefinition = "varchar(64) comment '类型'")
    private String cloudStyle;

    @Column(name = "cloud_area", columnDefinition = "int comment '区域'")
    private Integer cloudArea;

    @Column(name = "inside_ip", columnDefinition = "varchar(64) comment '内网id'")
    private String insideIp;

    @Column(name = "eip", columnDefinition = "varchar(64) comment 'EIP'")
    private String eip;

    @Column(name = "slb", columnDefinition = "varchar(64) comment 'SLB'")
    private String slb;

    @Column(name = "operation_sys", columnDefinition = "int comment '操作系统'")
    private String operationSys;

    @Column(name = "cpu", columnDefinition = "int comment 'CPU'")
    private String cpu;

    @Column(name = "memory", columnDefinition = "int comment '内存'")
    private String memory;

    @Column(name = "manage_control", columnDefinition = "varchar(64) comment '管理控制台'")
    private String manageControl;

    @Column(name = "master_name", columnDefinition = "varchar(64) comment '主机名'")
    private String masterName;

    @Column(name = "user_id", columnDefinition = "varchar(64) comment '责任人'")
    private String userId;

    @Column(name = "application", columnDefinition = "varchar(64) comment '应用'")
    private String application;

    @Column(name = "business_name", columnDefinition = "varchar(64) comment '业务系统'")
    private String businessName;

    @Column(name = "mark", columnDefinition = "varchar(64) comment '删除标记1默认,2软删除'")
    private String mark;

    /**
     * 修改后
     */
    @Column(name = "cloud_id_modified", columnDefinition = "int comment '云平台id(修改后)'")
    private String cloudIdModified;

    @Column(name = "cloud_style_modified", columnDefinition = "int comment '类型(修改后)'")
    private String cloudStyleModified;

    @Column(name = "cloud_area_modified", columnDefinition = "int comment '区域(修改后)'")
    private Integer cloudAreaModified;

    @Column(name = "inside_ip_modified", columnDefinition = "varchar(64) comment '内网id(修改后)'")
    private String insideIpModified;

    @Column(name = "eip_modified", columnDefinition = "varchar(64) comment 'EIP(修改后)'")
    private String eipModified;

    @Column(name = "slb_modified", columnDefinition = "varchar(64) comment 'SLB(修改后)'")
    private String slbModified;

    @Column(name = "operation_sys_modified", columnDefinition = "int comment '操作系统(修改后)'")
    private String operationSysModified;

    @Column(name = "cpu_modified", columnDefinition = "int comment 'CPU(修改后)'")
    private String cpuModified;

    @Column(name = "memory_modified", columnDefinition = "int comment '内存(修改后)'")
    private String memoryModified;

    @Column(name = "manage_control_modified", columnDefinition = "varchar(64) comment '管理控制台(修改后)'")
    private String manageControlModified;

    @Column(name = "master_name_modified", columnDefinition = "varchar(64) comment '主机名(修改后)'")
    private String masterNameModified;

    @Column(name = "user_id_modified", columnDefinition = "varchar(64) comment '责任人(修改后)'")
    private String userIdModified;

    @Column(name = "application_modified", columnDefinition = "varchar(64) comment '应用(修改后)'")
    private String applicationModified;

    @Column(name = "mark_modified", columnDefinition = "varchar(64) comment '删除标记,1默认,2软删除(修改后)'")
    private String markModified;

    @Column(name = "business_name_modified", columnDefinition = "varchar(64) comment '业务系统(修改后)'")
    private String businessNameModified;

}
